<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath + "admin" %>"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link  rel="stylesheet" type="text/css" href="assets/plugins/bootstrap/css/bootstrap.css"/>
	<script type="text/javascript" src="assets/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap/js/bootstrap.js"></script>
	<style type="text/css">
		#mainbox{
			width:1000px;
			margin:10px auto 0 auto;
		}
		#header{
			
		}
		#headlogo{
			height:100px;
			background:#686868;
			
			color:white;
		}
		#footer{
			width:100%;
			background:#222222;
			color:white;
			font-size:11px;
			margin-top:1em;
			float:left;			
		}
		#footer p{
			text-align:center;
			margin:auto;
		} 
		#content {
			margin-bottom:80px;
		}
	
	</style>
	<script type="text/javascript">	
function checkform(){
	
	checked=false;
	if(document.getElementById("name").value!="")
	{
		checked=true;
	}
	if (!checked){
		alert('请完整填写应用信息');
		return false;
	}
}
</script>
  </head>
  
  <body>


  
  		<div id="mainbox">
  		<div id="header">
  				<jsp:include page="../../Template/admin_top.jsp"></jsp:include>
  		</div>
  		<div id="content">
  				<a href="admin/detool_addInput">添加应用</a><br><br>
  	
			  	<s:form name="form1" action="admin/detool_query" method="post">
			   		<s:textfield name="name" id="name"/><br />
			        <s:submit value="搜索" onclick="return checkform()"/>
				</s:form>
				
			    <s:if test="detools.size > 0">
			   
			    <p>共有 <s:property value="rowCount"/> 条查询结果</p>
			    <table>
			    <tr><td>应用名</td><td>文件名</td><td>上传时间</td><td>下载次数</td><td></td><td></td><td></td></tr>
			    <s:iterator value="detools" var="detool">
		    	<tr>
		    	
		   		<td width="80"><s:property value="name"/></td>
		   		
		   		<td width="150"><s:property value="dwUrl"/></td>
		   		
		   		<td width="250"><s:property value="uploadtime"/></td>
		   		
		   		<td width="80"><s:property value="downloadcount"/></td>
		   		
				<td width="80"><a href="admin/detool_download?id=${detool.id}">点击下载</a></td>
		   		
		   		<td width="160"><a href="admin/detool_updateInput?id=${detool.id}">点击进入修改页面</a></td>
		   		
		   		<td width="80"><a href="admin/detool_delete?id=${detool.id}">删除</a></td>
		   		
		   		</tr>
			   	</s:iterator>
			   	</table>
			   	</s:if>
			   	<s:else>没有符合要求的结果<br></s:else>
			   	<a href="admin/detool_list">返回</a>
			   	<s:debug></s:debug>
  		</div>
  		<div id="footer" style="bottom:0;position:fixed;">
  			<p>java 分享平台技术中心</p>
	    	<p>© Cuit software 2012 </p>
  		</div>
  		</div>
  	
  </body>
</html>
